<template>
  <tableList
      border
      :heightMin="70"
      :keySet="keySet2"
      :autoHeight="true"
      :tableData="$store.state.manualNegativeInvoice.flowList"
      :showIndex="true"
      :paginationShow="true"
      :pageNumber="$store.state.manualNegativeInvoice.pages.current"
      :pageSize="$store.state.manualNegativeInvoice.pages.size"
      :total="$store.state.manualNegativeInvoice.pages.total"
      @handleSizeChange="handleSizeChange"
      @handleCurrentChange="handleCurrentChange"
  >
    <!-- <template #yslbz="{row}">
        <div>
            {{ row.yslbz === 'Y' ? '有原税率':'无原税率' }}
        </div>
    </template>
    <template #slzsl="{row}">
        <div>
            {{ row.slzsl || 0 }}%
        </div>
    </template> -->
  </tableList>
</template>

<script>
import tableList from '@/components/tableList/index.vue'

export default {
  data() {
    return {
      keySet2: [
        {
          label: '发票号码',
          englishName: 'fphm',
          width: 200,
        },
        {
          label: '上传状态',
          englishName: 'sczt',
          width: 80,
        },
        {
          label: '上传结果',
          englishName: 'scjg',
          width: 80,
        },
        {
          label: '开票日期',
          englishName: 'kprq',
          width: 150
        },
        {
          label: '购买方名称',
          englishName: 'gmfmc',
        },
        {
          label: '价税合计金额',
          englishName: 'jshj',
        },
        {
          label: '金额',
          englishName: 'hjje',
        },
        {
          label: '税额',
          englishName: 'hjse',
        },
        {
          label: '红字信息确认单编号',
          englishName: 'hzxxqrdbh',
          width: 200
        },
        {
          label: '红冲原因',
          englishName: 'zfchyy',
        },
        {
          label: '对应蓝字发票号码',
          englishName: 'dylzfphm',
          width: 200
        },
      ],
    }
  },
  methods: {
    handleSizeChange(val) {
      this.$store.state.manualNegativeInvoice.pages.current = 1;
      this.$store.state.manualNegativeInvoice.pages.size = val;
      this.$store.dispatch('manualNegativeInvoice/getList')
    },
    handleCurrentChange(val) {
      this.$store.state.manualNegativeInvoice.pages.current = val;
      this.$store.dispatch('manualNegativeInvoice/getList')
    },
  },
  components: {
    tableList
  },
}
</script>
